package com.vrp3d.common.exceptions;

import java.util.Map;

/**
 * @author vrp3d
 */
public class BusinessException extends RuntimeException {
    private String code;
    private String message;
    private String module;
    private Map<Object, Object> param;

    public BusinessException() {
    }

    public BusinessException(String module) {
        this.module = module;

    }

    public BusinessException(String code, String message) {
        this(code, message, (String) null);
    }

    public BusinessException(String code, String message, String module) {
        this.module = module;
        this.message = message;
        this.code = code;
    }

    public BusinessException(String code, String message, Map<Object, Object> param) {
        this.param = param;
        this.message = message;
        this.code = code;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public Map<Object, Object> getParam() {
        return param;
    }

    public void setParam(Map<Object, Object> param) {
        this.param = param;
    }
}
